<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/include.inc.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <%@include file="/WEB-INF/views/layout/miiteen/base.ref.jsp" %>
</head>
<body>
<div class="mainpage edit">
    <!--顶部菜单-->
    <div class="page-topmenu">
        <shiro:hasPermission name="${tableName}:edit">
            <div class="btn-panel">
                <el-button type="primary" size="small" icon="el-icon-check" @click="save">保存</el-button>
            </div>
        </shiro:hasPermission>
        <div class="btn-panel">
            <el-button size="small" icon="el-icon-back" @click="back">返回</el-button>
        </div>
    </div>
    <!--编辑表单-->
    <el-form :ref="formid" :model="form" :rules="rules" size="small" :label-width="labelwidth"
             :label-position="labelposition"
             class="one-col" :validate-on-rule-change="false">
        <!--视业务进行更改-begin-->
        <el-form-item label="名称" prop="name">
            <el-input v-model="form.name" placeholder="名称"></el-input>
        </el-form-item>
        <el-form-item label="编码" prop="codeValue">
            <el-input v-model="form.codeValue" placeholder="编码"></el-input>
        </el-form-item>
        <el-form-item label="顺序" prop="showOrder">
            <el-input v-model.number="form.showOrder" placeholder="顺序"></el-input>
        </el-form-item>
        <!--视业务进行更改-end-->
    </el-form>
</div>
<script>
    //初始化数据，必须放置在列表页面封装部分前
    function initVueOption(obj) {
        //设置控制器
        obj.data.controller = "${ctx}/pubTable";
        //设置表单数据
        obj.data.form = ${pubTable};
        //设置校验规则，没有则删掉
        obj.data.rules = {
            name: [
                {required: true, message: '请输入名称', trigger: 'blur'}
            ],
            codeValue: [
                {required: true, message: '请输入编码', trigger: 'blur'}
            ],
            showOrder: [
                {type: "integer", message: '请输入整数', trigger: 'blur'}
            ]
        }
    }
</script>
<!--编辑页面封装部分-->
<%@include file="/WEB-INF/views/layout/miiteen/page.edit.ref.jsp" %>
</body>
</html>

